package com.intelligencesoft.pss.dao.binding;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.intelligencesoft.pss.dao.BaseDao;
import com.intelligencesoft.pss.entity.binding.BindingList;
import com.intelligencesoft.pss.enums.BindingType;

@Repository
public class BindingListDao extends BaseDao<BindingList>{
	
	public BindingList loadByBindingType(BindingType bindingType){
		
		BindingList bindingList = new BindingList();
		bindingList.setBindingType(bindingType);
		
		List<BindingList> example = (List<BindingList>)this.getHibernateTemplate().findByExample(bindingList);
		if(example != null){
			return example.get(0);
		}
		return null;
		
	}
}
